﻿using System;
using System.Windows.Controls;
using jSLCore.Client.Presentation.BaseControl;

namespace jSLApp.Client.Forms
{
    public partial class OnePageForm
    {
        public OnePageForm()
        {
            InitializeComponent();
            Loaded += (sender, args) =>
                          {
                              browser.SourceUrl = GetUri();  
                          };
        }

        protected virtual Uri GetUri()
        {
            return new Uri(GetSource(),UriKind.Relative);
        }

        protected virtual string GetSource()
        {
            throw new NotImplementedException("You have to override at least GetSource method. (You can override GetUri Method)");
        }
    }
}
